package com.town.pojo;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//@component（组件） 等价于<bean id="user" class="com.monkey.pojo.User"/>
@Component
public class User {
    //相当于<property name="name" value="monkey"/>
    @Value("town")
    public String name;
}